
import {ALLADDRLIST, MODIFYADDR, DEFAULTADDR} from './mutations-types'
export default{
  [ALLADDRLIST] (state, arr) {
    state.allAddrList = arr
  },
  // 当前修改的地址
  [MODIFYADDR] (state, obj) {
    let newobj = {}
    newobj = JSON.parse(JSON.stringify(obj)) // 深度拷贝对象
    state.modifyAddr = newobj
  },
  // 获取默认地址信息
  [DEFAULTADDR] (state, addr) {
    state.defaultAddr = addr
  }
}
